Skip to content

Fix #42356: consolidate Copilot CLI parameters and in-session commands - #42357

Open
sagarpandey88 wants to merge 1 commit into
github:mainfrom
sagarpandey88:issue-42356-fix-cli-params
Open

Fix #42356: consolidate Copilot CLI parameters and in-session commands#42357
sagarpandey88 wants to merge 1 commit into
github:mainfrom
sagarpandey88:issue-42356-fix-cli-params

Conversation

@sagarpandey88

@sagarpandey88 sagarpandey88 commented Jan 12, 2026

Copy link
Copy Markdown

Why:

Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

  • A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require an SME review from GitHub staff.
  • The changes in this PR meet the docs fundamentals that are required for all content.
  • All CI checks are passing and the changes look good in the review environment.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR to the GitHub Docs project!

In order to review and merge PRs most efficiently, we require that all PRs grant maintainer edit access before we review them. For information on how to do this, see the documentation.

@github-actions github-actions Bot added the triage Do not begin working on this issue until triaged by the team label Jan 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

How to review these changes 👓

Thank you for your contribution. To review these changes, choose one of the following options:

A Hubber will need to deploy your changes internally to review.

Table of review links

Note: Please update the URL for your staging server or codespace.

The table shows the files in the content directory that were changed in this pull request. This helps you review your changes on a staging server. Changes to the data directory are not included in this table.

Source Review Production What Changed
copilot/how-tos/use-copilot-agents/use-copilot-cli.md fpt
ghec
fpt
ghec

Key: fpt: Free, Pro, Team; ghec: GitHub Enterprise Cloud; ghes: GitHub Enterprise Server

🤖 This comment is automatically generated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive documentation for GitHub Copilot CLI parameters and in-session commands by consolidating reference information into two well-organized tables. This addresses issue #42356 and provides users with a clear reference for both command-line options and interactive session commands.

Changes:

  • Added "CLI parameters" section with a table documenting command-line flags and options
  • Added "In-session commands" section with a table documenting slash commands and interactive features
  • Included examples for each parameter and command to aid user understanding

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +118 to +131
| `/list-dirs` | Display all allowed directories for file access | `/list-dirs` |
| `/login` | Log in to Copilot | `/login` |
| `/logout` | Log out of Copilot | `/logout` |
| `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations | `/mcp add` |
| `/model [model]` | Select AI model to use | `/model gpt-5-mini` |
| `/reset-allowed-tools` | Reset the list of allowed tools during the session | `/reset-allowed-tools` |
| `/session` | Show information about the current CLI session | `/session` |
| `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities | `/skills list` |
| `/terminal-setup` | Configure terminal for multiline input support | `/terminal-setup` |
| `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme | `/theme set dark` |
| `/usage` | Display session usage metrics and statistics | `/usage` |
| `/user [show, list, switch]` | Manage GitHub user list | `/user list` |
| `?` | Display interactive help and available commands | `?` |
| `!<shell command>` | Run a shell command directly from the prompt without calling the model | `!git clone https://github.com/github/copilot-cli` |

Copilot AI Jan 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The descriptions in this table are inconsistently punctuated. Some descriptions end with periods while others don't. For consistency and proper documentation style, all descriptions should either consistently include or exclude terminal periods. Based on standard documentation practices, all descriptions should end with periods since they are complete phrases describing actions.

Suggested change
| `/list-dirs` | Display all allowed directories for file access | `/list-dirs` |
| `/login` | Log in to Copilot | `/login` |
| `/logout` | Log out of Copilot | `/logout` |
| `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations | `/mcp add` |
| `/model [model]` | Select AI model to use | `/model gpt-5-mini` |
| `/reset-allowed-tools` | Reset the list of allowed tools during the session | `/reset-allowed-tools` |
| `/session` | Show information about the current CLI session | `/session` |
| `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities | `/skills list` |
| `/terminal-setup` | Configure terminal for multiline input support | `/terminal-setup` |
| `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme | `/theme set dark` |
| `/usage` | Display session usage metrics and statistics | `/usage` |
| `/user [show, list, switch]` | Manage GitHub user list | `/user list` |
| `?` | Display interactive help and available commands | `?` |
| `!<shell command>` | Run a shell command directly from the prompt without calling the model | `!git clone https://github.com/github/copilot-cli` |
| `/list-dirs` | Display all allowed directories for file access. | `/list-dirs` |
| `/login` | Log in to Copilot. | `/login` |
| `/logout` | Log out of Copilot. | `/logout` |
| `/mcp [show, add, edit, delete, disable, enable] [server-name]` | Manage MCP servers and configurations. | `/mcp add` |
| `/model [model]` | Select AI model to use. | `/model gpt-5-mini` |
| `/reset-allowed-tools` | Reset the list of allowed tools during the session. | `/reset-allowed-tools` |
| `/session` | Show information about the current CLI session. | `/session` |
| `/skills [list, info, add, remove, reload] [args...]` | Manage skills for enhanced capabilities. | `/skills list` |
| `/terminal-setup` | Configure terminal for multiline input support. | `/terminal-setup` |
| `/theme [show, set, list] [auto, dark, light]` | View or configure terminal theme. | `/theme set dark` |
| `/usage` | Display session usage metrics and statistics. | `/usage` |
| `/user [show, list, switch]` | Manage GitHub user list. | `/user list` |
| `?` | Display interactive help and available commands. | `?` |
| `!<shell command>` | Run a shell command directly from the prompt without calling the model. | `!git clone https://github.com/github/copilot-cli` |

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +98
| `--agent=<name>` | Use a named custom agent for this run. | `copilot --agent=refactor-agent --prompt "Refactor this code block"` |
| `-p "<text>"` or `--prompt "<text>"` | Provide a prompt non-interactively (non-interactive mode exits after completion). | `copilot -p "Run tests and fix failures"` |
| `-i "<text>"` or `--interactive "<text>"` | Start interactive mode and automatically execute a prompt. | `copilot -i "Fix the bug in main.js"` |
| `--resume` | Resume a previously saved interactive session (session picker). | `copilot --resume` |
| `--continue` | Quickly resume the most recently closed session. | `copilot --continue` |
| `--model <model>` | Start with a specific model. | `copilot --model gpt-5` |
| `--add-dir <path>` (repeatable) | Allow access to one or more directories by repeating the flag. | `copilot --add-dir /home/user/projects --add-dir ~/workspace` |
| `--allow-all-paths` | Disable path verification for this run (trust all filesystem paths). | `copilot --allow-all-paths` |
| `--allow-tool '<tool>'` | Allow a specific tool or tool pattern. | `copilot --allow-tool 'write'` |
| `--deny-tool '<tool>'` | Deny a specific tool (can be used alongside `--allow-tool`). | `copilot --deny-tool 'MyMCP(denied_tool)' --allow-tool 'MyMCP'` |
| `--allow-all-tools` | Allow all tools without per-command approval for this run. | `copilot --allow-all-tools --resume` |
| `--allow-url <domain>` (repeatable) | Pre-approve one or more domains for network access by repeating the flag. | `copilot --allow-url github.com --allow-url api.github.com` |
| `--deny-url <url>` | Deny network access to a specific URL/domain. | `copilot --deny-url malicious-site.com` |
| `--allow-all-urls` | Allow all URLs without confirmation. | `copilot --allow-all-urls` |
| `--help` or `help` | Show CLI help and available commands. | `copilot help` |

Copilot AI Jan 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The descriptions in this table are inconsistently punctuated. Some descriptions end with periods while others don't. For consistency and proper documentation style, all descriptions should end with periods since they are complete phrases describing actions. This follows the pattern used in other documentation tables in the repository.

Copilot uses AI. Check for mistakes.
| `/feedback` | Provide feedback about the CLI | `/feedback` |
| `/help` | Show help for interactive commands | `/help` |
| `/list-dirs` | Display all allowed directories for file access | `/list-dirs` |
| `/login` | Log in to Copilot | `/login` |

Copilot AI Jan 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "Copilot" should use the variable instead of hardcoded text. According to the coding guidelines, you should always use Liquid syntax variables rather than text if a variable has been defined. Replace "Copilot" with the appropriate variable such as {% data variables.product.prodname_copilot_short %}.

Copilot generated this review using guidance from repository custom instructions.
| `/help` | Show help for interactive commands | `/help` |
| `/list-dirs` | Display all allowed directories for file access | `/list-dirs` |
| `/login` | Log in to Copilot | `/login` |
| `/logout` | Log out of Copilot | `/logout` |

Copilot AI Jan 12, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word "Copilot" should use the variable instead of hardcoded text. According to the coding guidelines, you should always use Liquid syntax variables rather than text if a variable has been defined. Replace "Copilot" with the appropriate variable such as {% data variables.product.prodname_copilot_short %}.

Copilot generated this review using guidance from repository custom instructions.
@Sharra-writes Sharra-writes added content This issue or pull request belongs to the Docs Content team copilot Content related to GitHub Copilot and removed triage Do not begin working on this issue until triaged by the team labels Jan 22, 2026
@Sharra-writes

Copy link
Copy Markdown
Contributor

@sagarpandey88 Thanks for opening an issue and PR! This is a significant change, so it's definitely one I'll have to run by the Copilot team, as well as our writing team.

@github-actions

Copy link
Copy Markdown
Contributor

A stale label has been added to this pull request because it has been open 30 days with no activity. If you think this pull request should remain open, please add a new comment.

@github-actions github-actions Bot added the Inactive Will be closed automatically by a stall check if no activity is detected. label Feb 24, 2026
@Sharra-writes Sharra-writes removed the Inactive Will be closed automatically by a stall check if no activity is detected. label Feb 25, 2026
@haniphe138200-pixel

Copy link
Copy Markdown

GitHub Docs

GitHub is a developer platform for building, shipping, and maintaining software. It provides cloud-based Git repository hosting, CI/CD via GitHub Actions, project management with Issues and Projects, code review via pull requests, AI-powered development with GitHub Copilot, and APIs (REST and GraphQL) for automation and integration.

How to use

To retrieve full article content, page lists, or search results programmatically, please use the APIs below. To find a specific article, use the Search API with a query. To browse all available pages, use the Page List API to get a list of paths, then fetch individual articles with the Article API. The /api/article/body endpoint returns markdown, ideal for LLM consumption. These APIs return structured markdown and JSON and are the preferred way for LLMs and automated tools to access GitHub documentation.

  • Versions API: Lists all available documentation versions.
  • Languages API: Lists all available languages.
  • Page List API: Returns every docs page path for a given language and version.
  • Article API: Returns the full rendered content and context of any docs page as JSON. Example: curl "https://docs.github.com/api/article?pathname=/en/get-started/start-your-journey/what-is-github"
  • Article Body API: Returns the full rendered content of any docs page as markdown. Example: curl "https://docs.github.com/api/article/body?pathname=/en/get-started/start-your-journey/what-is-github"
  • Search API: Search across all docs content. Example: curl "https://docs.github.com/api/search/v1?query=actions&language=en&version=free-pro-team@latest"
  • GitHub MCP server: For agents that connect via Model Context Protocol, the GitHub MCP server provides tools for working with GitHub itself: repositories, issues, pull requests, workflows, and code. It does not currently include docs search.

Building with GitHub, for coding agents and automation

  • Extend Copilot Chat with MCP: Connect MCP servers to Copilot Chat to share context from other applications.
  • Use the GitHub MCP Server: Learn how to use the GitHub Model Context Protocol (MCP) server to interact with repositories, issues, pull requests, and other GitHub features, directly from Copilot Chat in your IDE.
  • Set up the GitHub MCP Server: Learn how to configure the GitHub Model Context Protocol (MCP) server.
  • About cloud agent: Copilot can research a repository, create an implementation plan, and make code changes on a branch. You can review the diff, iterate, and create a pull request when you're ready.
  • Create custom agents in your IDE: You can create specialized agents with tailored expertise for specific development tasks.
  • GitHub CLI: GitHub CLI is an open source tool for using GitHub from your computer's command line. When you're working from the command line, you can use the GitHub CLI to save time and avoid switching context.
  • Quickstart: Start using GitHub CLI to work with GitHub in the command line.
  • REST API: Create integrations, retrieve data, and automate your workflows with the GitHub REST API.
  • GraphQL API: To create integrations, retrieve data, and automate your workflows, use the GitHub GraphQL API. The GitHub GraphQL API offers more precise and flexible queries than the GitHub REST API.
  • GitHub Actions: Automate, customize, and execute your software development workflows right in your repository with GitHub Actions. You can discover, create, and share actions to perform any job you'd like, including CI/CD, and combine actions in a completely customized workflow.

GitHub Copilot

You can use GitHub Copilot to enhance your productivity and assist as you work on code.

  • GitHub Copilot: You can use GitHub Copilot to enhance your productivity and assist as you work on code.
  • Individual plans: GitHub offers several Copilot plans for individual developers, each with different features, model access, and usage limits to support a wide range of coding needs.
  • Billing for individuals: Your Copilot plan includes a monthly allowance of GitHub AI Credits. If you exhaust your AI credits, you can pay extra to keep working.
  • Auto model selection: Automatically select the best model for each task.
  • Best practices: Learn how to get the most out of Copilot.
  • Features: GitHub Copilot offers a suite of features for users and administrators.
  • Plans: Learn about the available plans for Copilot.
  • Quickstart: Quickly learn how to use GitHub Copilot.
  • What is GitHub Copilot?: Learn what Copilot is and what you can do with it.
  • Install Copilot CLI: Learn how to install Copilot CLI so that you can use Copilot directly from the command line.
  • Overview: Learn how to use GitHub Copilot from the command line.
  • Get IDE code suggestions: Use GitHub Copilot to get code suggestions in your editor.
  • Manage policies: Find out how to change your personal settings on GitHub to configure GitHub Copilot's behavior.
  • Install Copilot extension: To use Copilot in your preferred coding environment, follow the steps for your chosen IDE.
  • Use code review: Learn how to request a code review from GitHub Copilot.
  • Supported models: Learn about the supported AI models in GitHub Copilot.
  • Models and pricing: See per-token pricing for the models available in GitHub Copilot and reference rates for additional usage across plans.
  • Chat: Learn how to use GitHub Copilot Chat responsibly by understanding its purposes, capabilities, and limitations.

Get started

Learn how to start building, shipping, and maintaining software with GitHub. Explore our products, sign up for an account, and connect with the world's largest development community.

  • Get started: Learn how to start building, shipping, and maintaining software with GitHub. Explore our products, sign up for an account, and connect with the world's largest development community.
  • About remote repositories: GitHub's collaborative approach to development depends on publishing commits from your local repository to GitHub for other people to view, fetch, and update.
  • Handle line endings: To avoid problems in your diffs, you can configure Git to properly handle line endings.
  • Ignoring files: You can configure Git to ignore files you don't want to check in to GitHub.
  • Manage remote repositories: Learn to work with your local repositories on your computer and remote repositories hosted on GitHub.
  • Set up Git: At the heart of GitHub is an open-source version control system (VCS) called Git. Git is responsible for everything GitHub-related that happens locally on your computer.
  • GitHub's plans: An overview of GitHub's pricing plans.
  • Types of GitHub accounts: Accounts on GitHub allow you to organize and control access to code.
  • Start your journey: Brand new to GitHub? Learn the basics here.
  • Create an account: Create a personal account to get started with GitHub.
  • Download files: Learn how to download files from GitHub, and understand the difference between downloading, cloning, and forking.
  • Hello World: Follow this Hello World exercise to learn GitHub's pull request workflow.
  • What is GitHub?: GitHub is a platform that supports your entire software development process, from planning work to deploying and operating software.
  • Docs versions: You can read documentation that reflects the GitHub product you're currently using.
  • GitHub Mobile: Triage, collaborate, and manage your work on GitHub from your mobile device.
  • Basic formatting syntax: Create sophisticated formatting for your prose and code on GitHub with simple syntax.

Authentication

Authenticate securely to GitHub with passwords, tokens, SSH keys, and more—and keep your account protected.

  • Connect with SSH: You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.
  • Add a new SSH key: To configure your account on GitHub.com to use your new (or existing) SSH key, you'll also need to add the key to your account.
  • Check for existing SSH key: Before you generate an SSH key, you can check to see if you have any existing SSH keys.
  • Generate new SSH key: After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.
  • Managing deploy keys: Learn different ways to manage SSH keys on your servers when you automate deployment scripts and which way is best for you.
  • Test your SSH connection: After you've set up your SSH key and added it to GitHub, you can test your connection.
  • Authentication to GitHub: You can securely access your account's resources by authenticating to GitHub, using different credentials depending on where you authenticate.
  • Manage personal access tokens: You can use a personal access token in place of a password when authenticating to GitHub in the command line or with the API.
  • Sudo mode: To confirm access to your account before you perform a potentially sensitive action, GitHub.com prompts for authentication.
  • Displaying verification for all commits: You can enable vigilant mode for commit signature verification to mark all of your commits and tags with a signature verification status.
  • Configure 2FA: You can choose among multiple options to add a second source of authentication to your account.
  • Configure 2FA recovery: You can set up a variety of recovery methods to access your account if you lose your two-factor authentication credentials.
  • Recover an account with 2FA: If you lose access to your two-factor authentication credentials, you can use your recovery codes, or another recovery option, to regain access to your account.

Account and profile

Make GitHub work best for you by customizing your personal account settings and personalizing your profile page.

  • Account and profile: Make GitHub work best for you by customizing your personal account settings and personalizing your profile page.
  • Username changes: You can change the username for your GitHub account.
  • Account: Get started with your GitHub account.
  • How-tos: Learn how to accomplish specific tasks for your GitHub account and profile.
  • Manage cookie preferences: You can control how GitHub uses information from non-essential tracking cookies for enterprise marketing pages.
  • Troubleshoot missing contributions: Learn common reasons that contributions may be missing from your contributions graph.
  • Primary email address: To change your primary email address, you'll add a new email, then delete the old one.
  • Set commit email address: You can set the email address that is used to author commits on GitHub and on your computer.
  • Verify your email address: Verifying your primary email address ensures strengthened security, allows GitHub staff to better assist you if you forget your password, and gives you access to more features on GitHub.
  • Email addresses: Find information about your email addresses on GitHub, including verification, privacy, and commit attribution.
  • Personalize your profile: You can share information about yourself with other users by setting a profile picture and adding a bio to your profile.

GitHub Pages

GitHub Pages turns any GitHub repository into a live website—no separate hosting required.

  • GitHub Pages: GitHub Pages turns any GitHub repository into a live website—no separate hosting required.
  • Configure a custom domain: You can customize the domain name of your GitHub Pages site.
  • Custom domains in GitHub Pages: GitHub Pages supports using custom domains, or changing the root of your site's URL from the default, like octocat.github.io, to any domain you own.
  • Manage a custom domain: You can set up or update certain DNS records and your repository settings to point the default domain for your GitHub Pages site to a custom domain.
  • Configure publishing source: You can configure your GitHub Pages site to publish when changes are pushed to a specific branch, or you can write a GitHub Actions workflow to publish your site.
  • Create a GitHub Pages site: You can create a GitHub Pages site in a new or existing repository.
  • What is GitHub Pages?: You can use GitHub Pages to host a website about yourself, your organization, or your project directly from a repository on GitHub.
  • Quickstart: You can use GitHub Pages to showcase some open source projects, host a blog, or even share your résumé. This guide will help get you started on creating your next website.
  • Add theme to Pages site: You can personalize your Jekyll site by adding and customizing a theme.

GitHub Actions

Automate, customize, and execute your software development workflows right in your repository with GitHub Actions. You can discover, create, and share actions to perform any job you'd like, including CI/CD, and combine actions in a completely customized workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content This issue or pull request belongs to the Docs Content team copilot Content related to GitHub Copilot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants